import { IFeidaoAiMobile } from '@dfeidao/atom-mobile/interfaces';
import set from '@dfeidao/atom-mobile/local/set';
import nodejs from '@dfeidao/atom-mobile/msg/nodejs';
import render from '@dfeidao/atom-mobile/render/render';
import whoami_getparams from '../atom/whoami_getparams';
export default async function a001(fd: IFeidaoAiMobile) {
	const user = await whoami_getparams(fd) as {
		params: {
			teacher_name: string;
			productid: string;
			teacher_no: string;
		}
	};
	const page_no = 1;
	const res = await nodejs<Array<{}>>('app-teacher-class/s001', { teacher_no: user.params.teacher_no, productid: user.params.productid, page_no });
	set(fd, 'teacher_no', user.params.teacher_no);
	set(fd, 'productid', user.params.productid);
	set(fd, 'data', res);
	render(fd, { res, page_no, new_len: res.length });
}
